import { $get, $post } from "@js/request"
import { formatCaseDataLicenseAndMobile } from '@js/tool'


export async function getDetailRequest (id) {
  const res = await $get(`/api/xd/case/partyCaseRead/${id}`)
  if (res.data) {
    formatCaseDataLicenseAndMobile(res.data)
  }
  return res.data
}


// 获取操作列表
export async function getOperateRequest (caseid) {
  const res = await $get('/api/xd/caseoperate/partyOperate', {
    caseid
  })
  return res.data
}

// 更新操作
export async function addOperateUsedRequest (caseid, operate) {
  const res = await $post('/api/xd/caseoperate', {
    caseid,
    operate
  })
  return res.data
}
